projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72898ac
)
compulab: eeprom: propagate error value in read_mac_addr()
author
Nikita Kiryanov
<
[email protected]
>
Sun, 6 Sep 2015 08:48:36 +0000
(11:48 +0300)
committer
Stefano Babic
<
[email protected]
>
Sun, 13 Sep 2015 08:35:43 +0000
(10:35 +0200)
cl_eeprom_read_mac_addr() doesn't differentiate between success case and
inability to access eeprom. Fix this by propagating the return value of
cl_eeprom_setup().
Cc: Stefano Babic <
[email protected]
>
Cc: Igor Grinberg <
[email protected]
>
Signed-off-by: Nikita Kiryanov <
[email protected]
>
Acked-by: Igor Grinberg <
[email protected]
>
board/compulab/common/eeprom.c
patch
|
blob
|
history
diff --git
a/board/compulab/common/eeprom.c
b/board/compulab/common/eeprom.c
index aaacd2e32e92be1aaf5278d7f1292410b5bbf54b..9f18a3d949c98a0cfaf49e276f6cc45f2f2541f9 100644
(file)
--- a/
board/compulab/common/eeprom.c
+++ b/
board/compulab/common/eeprom.c
@@
-105,9
+105,11
@@
void get_board_serial(struct tag_serialnr *serialnr)
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
{
uint offset;
+ int err;
- if (cl_eeprom_setup(eeprom_bus))
- return 0;
+ err = cl_eeprom_setup(eeprom_bus);
+ if (err)
+ return err;
offset = (cl_eeprom_layout != LAYOUT_LEGACY) ?
MAC_ADDR_OFFSET : MAC_ADDR_OFFSET_LEGACY;